package Server.DataBase;

import java.io.Serializable;
import java.util.ArrayList;
/**
 *   initializes course class
 */
public class Lesson implements Serializable{
	
	/**
	 *private static final long serialVersionUID = 1L;
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * lesson id lesson
	 */
	private int idLesson;
	/**
	 * lesson schoole class
	 */
	private SchoolClass sClass;
	/**
	 * Course course
	 */
	private Course course;
	/**
	 * teacher 
	 */
	private Teacher teacher;
	/**
	 * lesson id semester
	 */
	private int idSemester;
	private ArrayList<Reg> areg;
	
	private Semester semester;
	/**
	 * constructor lesson init set attribute
	 * @param idLesson, SchoolClass , course,  teacher,  idSemester
	 */
	public Lesson(int idLesson, SchoolClass sClass, Course course, Teacher teacher, int idSemester) {
		super();
		this.idLesson = idLesson;
		this.sClass = sClass;
		this.course = course;
		this.teacher = teacher;
		this.idSemester = idSemester;
	}
	/**
	 * 
	 * @return idSemester
	 */		
	public Lesson(int idLesson, SchoolClass sClass, Course course, Teacher teacher, int idSemester,ArrayList<Reg> areg) {
		super();
		this.idLesson = idLesson;
		this.sClass = sClass;
		this.course = course;
		this.teacher = teacher;
		this.idSemester = idSemester;
		this.areg=areg;
	}
	
	public ArrayList<Reg> getAreg() {
		return areg;
	}
	public Lesson(int idLesson, SchoolClass sClass, Course course, Teacher teacher, Semester semester) {
		super();
		this.idLesson = idLesson;
		this.sClass = sClass;
		this.course = course;
		this.teacher = teacher;
		this.semester = semester;
		this.idSemester = semester.getIdSemester();
	}
	
	public int getIdSemester() {
		return idSemester;
	}
	/**
	 * 
	 * @return idLesson
	 */	
	public int getIdLesson() {
		return idLesson;
	}

	/**
	 * 
	 * @return sClass
	 */	
	public SchoolClass getsClass() {
		return sClass;
	}
	/**
	 * 
	 * @return course
	 */	
	public Course getCourse() {
		return course;
	}
	/**
	 * 
	 * @return teacher
	 */	
	public Teacher getTeacher() {
		return teacher;
	}
	/**
	 * 
	 * @return sClass course name
	 */	
	public String toString(){
		return sClass.getClassName()+" "+course.getCourseName();
	}

	public Semester getSemester() {
		return semester;
	}
	
	
	
}
